home *** CD-ROM | disk | FTP | other *** search
/ Complete Linux / Complete Linux.iso / docs / apps / database / postgres / postgre4.z / postgre4 / src / storage / page / itemid.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-08-27  |  1.1 KB  |  63 lines

  1. /*
  2.  * itemid.c --
  3.  *    POSTGRES standard buffer page item identifier (line table) code.
  4.  */
  5.  
  6. #include "tmp/c.h"
  7.  
  8. #include "storage/item.h"
  9. #include "storage/buf.h"
  10. #include "storage/bufmgr.h"
  11. #include "storage/itemid.h"
  12.  
  13. RcsId("$Header: /private/postgres/src/storage/page/RCS/itemid.c,v 1.6 1991/04/28 09:14:37 cimarron Exp $");
  14.  
  15. /* 
  16.  *    ItemIdIsValid is now a macro in itemid.h -cim 4/27/91
  17.  */
  18.  
  19. bool
  20. ItemIdIsUsed(itemId)
  21.     ItemId    itemId;
  22. {
  23.     Assert(ItemIdIsValid(itemId));
  24.  
  25.     return ((bool)((itemId->lp_flags & LP_USED) != 0));
  26. }
  27.  
  28. bool
  29. ItemIdIsContinuation(itemId)
  30.     ItemId    itemId;
  31. {
  32.     Assert(ItemIdIsValid(itemId));
  33.  
  34.     return ((bool)((itemId->lp_flags & LP_CTUP) != 0));
  35. }
  36.  
  37. bool
  38. ItemIdIsInternal(itemId)
  39.     ItemId    itemId;
  40. {
  41.     Assert(ItemIdIsValid(itemId));
  42.  
  43.     return ((bool)((itemId->lp_flags & LP_ISINDEX) != 0));
  44. }
  45.  
  46. bool
  47. ItemIdIsLock(itemId)
  48.     ItemId    itemId;
  49. {
  50.     Assert(ItemIdIsValid(itemId));
  51.  
  52.     return ((bool)((itemId->lp_flags & LP_LOCK) != 0));
  53. }
  54.  
  55. bool
  56. ItemIdIsContinuing(itemId)
  57.     ItemId    itemId;
  58. {
  59.     Assert(ItemIdIsValid(itemId));
  60.  
  61.     return ((bool)((itemId->lp_flags & LP_DOCNT) != 0));
  62. }
  63.